﻿using Tszy.Unlimited.Base.Extensions;
using Tszy.Unlimited.Base.Models;

namespace Tszy.Examples.Json;

internal class JsonService
{
    public static void Execute()
    {
        var param = new List<TestJsonModel>();

        var res = ResponseResult<IEnumerable<TestJsonModel>>.Success(param);

        var json = res.ToJson();

        var res2 = json.FromJson<ResponseResult<IEnumerable<TestJsonModel>>>();
    }

    public class TestJsonModel
    {
        public int Id { get; set; }
    }
}
